<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$u = $this->session->userdata('username');
?>

<div class="content_container">
    <div id="control_panel">
        <div id="welcome_user">
            Welcome, <?= $u ?>
        </div>
        <div id="user_details">
            <div id="user_details_title">Team Details</div>
            <?php
            /* id,username,password,email,university,zone,province,team_name,leader_name,leader_gender,leader_dob,leader_phone,is_cv,is_id,is_letter */
            ?>
            <div id="team_details_cp">
                <div class="user_details_row">Team name : <?= $user['details']['team_name'] ?></div>
                <div class="user_details_row">Team Leader : <?= $user['members']['member_name_1'] ?></div>
                <div id="change_password"><a href="<?= base_url() . index_page() . '/profile/change_password/' ?>">Change Account Password</a></div>
            </div>
            <div id="member_names_cp">
                <div id="members">Members :</div>
                <div class="user_details_row"> #1 : <?= $user['members']['member_name_1'] ?></div>
                <div class="user_details_row"> #2 : <?= $user['members']['member_name_2'] ?></div>
                <div class="user_details_row"> #3 : <?= $user['members']['member_name_3'] ?></div>
                <div class="user_details_row"> #4 : <?= $user['members']['member_name_4'] ?></div>
                <div id="edit_link"><a href="<?= base_url() . index_page() . '/profile/edit_members/view' ?>">Edit Members</a></div>
            </div>


        </div>
        <div id="information">

        </div>
        <div id="link_online_selection">
            <?php
            //cek dulu apakah syarat administrasi udah lengkap & sudah terima email waktu OnCmptition? 
            //kalo udah tapilin linknya
            ?>
        </div>
        <?php
        $attr = array('name' => 'form_upload_adm');
        echo form_open_multipart('registration/upload_adm', $attr)
        ?>
        <div id="adm_status">
            <div id="adm_status_title">Administration Status</div>
            <div id="letter_s">Letter from Campus : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_letter'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            
            <div class="id_s">ID Card 1 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_id1'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="id_s">ID Card 2 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_id2'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="id_s">ID Card 3 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_id3'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="id_s">ID Card 4 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_id4'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="cv2">Curriculum Vitae 1 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_cv1'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="cv2">Curriculum Vitae 2 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_cv2'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="cv2">Curriculum Vitae 3 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_cv3'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
            <div class="cv2">Curriculum Vitae 4 : </div>
                <div class="adm_status">
                    <?php
                        if ($user['details']['is_cv4'] == 1){
                            echo '<font color="green">OK</font>';
                        }
                        else{
                            echo '<font color="red">not completed</font>';
                        }
                    ?>
                </div>
        </div>
        
        <div id="adm_upload">
            <div class="form_reg_subtitle">Upload your Administration Requirement</div>
            <br/>
            <br/>
            <div class="form_row">Letter from Campus : <input type="file" id="letter" name="letter"/></div>
            <br/>
            <div class="form_reg_subtitle">Each member's Student ID Card :<br/><br/></div>
            <div class="form_row">Student ID Card 1 : <input type="file" class="id_card" name="id_card_1" id="id_card_1"/> (team leader)</div>
            <div class="form_row">Student ID Card 2 : <input type="file" class="id_card" name="id_card_2" id="id_card_2"/></div>
            <div class="form_row">Student ID Card 3 : <input type="file" class="id_card" name="id_card_3" id="id_card_3"/></div>
            <div class="form_row">Student ID Card 4 : <input type="file" class="id_card" name="id_card_4" id="id_card_4"/></div>
            <br/>
            <div class="form_reg_subtitle">Each member's Curriculum Vitae :<br/><br/></div>
            <div class="form_row">Curriculum Vitae 1 : <input type="file" class="cv" name="cv_1" id="cv_1"/> (team leader)</div>
            <div class="form_row">Curriculum Vitae 2 : <input type="file" class="cv" name="cv_2" id="cv_2"/></div>
            <div class="form_row">Curriculum Vitae 3 : <input type="file" class="cv" name="cv_3" id="cv_3"/></div>
            <div class="form_row">Curriculum Vitae 4 : <input type="file" class="cv" name="cv_4" id="cv_4"/></div>


            <div id="formvalid"></div>
            <?php echo form_submit('submit_adm', 'Submit'); ?>
<?php echo form_close(); ?>
        </div>
    </div>
</div>
